@extends('main')
@section('title')
View/Profile
@endsection
@section('content')
	<div class="frm_signup">
	    <p>Edit profile .</p>
	 
		{{ Form::open(array('route' => 'edit.profile','id' => 'form_login', 'files' => true)) }}
		{{ $errors->first('username') }} <br />
		{{ $errors->first('password') }}<br />
		<?php if(isset($error1)) echo $error1; ?><br />
		<input type="text" name="firstName" value='<?php if(Input::old("firstName") == null) echo $user->UserInformation->firstname; 	else echo Input::old("firstName"); ?>' 	placeholder="firstName"></input><br>
		<input type="text" name="lastName" 	value='<?php if(Input::old("lastName") 	== null) echo $user->UserInformation->lastname; 	else echo Input::old("lastName"); ?>' 	placeholder="lastName"></input><br>
		<input type="text" name="nickname" 	value='<?php if(Input::old("nickname") 	== null) echo $user->nickname; 						else echo Input::old("nickname"); ?>' 	placeholder="nickname"></input><br>
		<input type="text" name="email" 	value='<?php if(Input::old("email") 	== null) echo $user->email; 						else echo Input::old("email"); ?>' 		placeholder="email"></input><br>
		<input type="text" name="mobile" 	value='<?php if(Input::old("mobile") 	== null) echo $user->mobile; 						else echo Input::old("mobile"); ?>' 	placeholder="mobile"></input><br>
		<input type="text" name="username" 	value='<?php if(Input::old("username") 	== null) echo $user->username; 						else echo Input::old("username"); ?>' 	placeholder="userName"></input><br>
		<input type="text" name="birthday" 	value='<?php if(Input::old("birthday") 	== null) echo date('d-m-Y',strtotime($user->UserInformation->birthday)); 	else echo Input::old("birthday"); ?>'  	placeholder="birthday"id="datepicker"></input><br>
		<textarea type="text" name="about" 	value='<?php if(Input::old("about") 	== null) echo $user->UserInformation->about; 		else echo Input::old("about"); ?>' 		placeholder="about of you" rows="4" cols="30"></textarea>><br>
		male 	<input <?php if(Input::old("gender") == null) {if($user->UserInformation->gender == 1) echo 'checked="checked"'; } else if(Input::old('gender')== 1) { echo 'checked="checked"'; } ?> name="gender" type="radio" value="1">
		female 	<input <?php if(Input::old("gender") == null) {if($user->UserInformation->gender == 0) echo 'checked="checked"'; } else if(Input::old('gender')== 0) { echo 'checked="checked"'; } ?> name="gender" type="radio" value="0">
		<div id="container_image"></div>  
		{{ Form::submit('signup',array('class' => 'btn btn_login' )); }}<br />
		{{ Form::close() }}

		<?php 
		echo 'sssss';
			if(isset($a)){
				print_r($a);
			}
		?>
		<script>
		  	$(function() {
			    $( "#datepicker" ).datepicker({
			      showOn: "button",
			      buttonImage: "images/calendar.gif",
			      buttonImageOnly: true,
			      buttonText: "Select date",
			      dateFormat: "dd-mm-yy"
			    });

			   $("#container_image").PictureCut({
                  InputOfImageDirectory       : "image",
                  PluginFolderOnServer        : "/shaphira/public/plugin/jquery_img_cut/",
                  FolderOnServer              : "/shaphira/public/uploads/",
                  EnableCrop                  : true,
                  CropWindowStyle             : "Bootstrap",
                  EnableMaximumSize			  : true,
                  MaximumSize                 : 700,
                  MinimumWidthToResize        : 50,
                  MinimumHeightToResize			:50
              });
		  	});
	  	</script>

	</div>
@endsection